<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>get缓存</title>
<script>
	var xmlHttp;
	try {
		//非IE、新IE
		xmlHttp = new XMLHttpRequest();
	} catch (e) {
		//IE6
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			//IE5.5
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("不支持Ajax");
			}
		}
	}
	function doGet() {
		xmlHttp.open("get", "Servlet3?param=get");
		
		//URL后缀无意义变动参数消除缓存
		//xmlHttp.open("get", "Servlet3?param=get&other=" + new Date());
		xmlHttp.onreadystatechange = getSend;
		xmlHttp.send();
	}
	
	/*
	经过测试，非IE和IE11无缓存，Microsoft Edge浏览器存在缓存
	*/
	function getSend() {
		if (xmlHttp.readyState == 4) {
			alert(xmlHttp.responseText);
		}
	}
</script>
</head>
<body>
	<input type="button" value="button" onclick="doGet()" />
</body>
</html>